import axios from 'axios';
import { diaryToolsDomain } from 'src/config/base';

// 往redis增加rag任务接口
export const addRagTask = async (uid: string, text: any) => {
    try {
        const response = await axios.post(`${diaryToolsDomain}/add_tag_task`, {
            uid,
            text
        }, {
            timeout: 5000
        });
        return response.data;
    } catch (error) {
        console.error('Error fetching data:', error);
        throw error;
    }
}
